Video coding standards that make use of several advanced video coding tools and techniques to provide high compression performance are well known in the art. In the past, standards such as MPEG-2, MPEG4, and H.263 have been widely adopted. More recently, H.264 has been widely adopted as it offers better compression performance than other video compression standards. At the core of all these video compression standards are the techniques of motion compensation and transform coding. A diagram illustrating the operational blocks of a video encoder that conforms to the H.264 standard is shown in FIG. 1.
Motion compensation schemes basically assume, for most sequences of video frames, the amount of change from one frame to the next is small. Thus, compression can be achieved by transmitting or storing information in a frame as a difference, or delta, from a previous frame, rather than as an independent image. In this way, only the changes between a new frame and a previous frame need to be captured. The frame used for comparison is called a reference frame.
The specific type of motion compensation schemes used by many video encoding standards, such as H.264 AVC, is called block motion compensation. Block motion compensation schemes typically decompose a frame into macroblocks where each macroblock contains 16×16 luminance values (Y) and two 8×8 chrominance values (Cb and Cr), although other block sizes are also used. These macroblocks are typically processed one at a time. The compression mechanism in a video encoder would attempt to find a macroblock in the reference frame that closely matches the current macroblock of the current frame (motion estimation), and the differences between these two blocks would be transformed and quantized. The transform of a macroblock converts the pixel values of the block from the spatial domain into a frequency domain for quantization. This transformation step may use a two-dimensional discrete cosine transform (DCT) or other transformation methods.
The residual macroblock data generated by the transformation step is then quantized, and then coded by using variable length coding. In H.264, a Context Adaptive Variable Length Coding (CAVLC) scheme or a Context Adaptive Binary Arithmetic Coding (CABAC) scheme can be used for the variable length coding step.
For low-latency H.264 baseline-profile video encoding hardware device (e.g., a mobile phone having wireless video transmission capability, or a security camera), it is desirable to execute CAVLC coding at least as quickly as other stages of the encoder.